﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _2021_5_20
{
    #region 动物类
    class Animal
    {
        public int Leg { get; set; }
        public int Head { get; set; }
        public void Eat()
        {
            Console.WriteLine("我能吃。");
        }
        public void Sleep()
        {
            Console.WriteLine("我能睡。");
        }

        public virtual void Cry()
        {
            Console.WriteLine("我能叫。");
        }

        public void Walk()
        {
            Console.WriteLine("我能走。");
        }

        public virtual void RaceSkill()
        {
           
        }

    }
    #endregion

    #region 猫科
    class Felidae:Animal
    {
        public Felidae()
        {
            Leg = 4;
            Head = 1;
        }

        public override void RaceSkill()
        {
            Console.WriteLine("我可以夜视。");
        }

    }
    #endregion

    #region 鸟
    class Birds:Animal
    {
        public int Wings { get; set; }
        public Birds()
        {
            Leg = 2;
            Head = 1;
            Wings = 2;
        }

        public override void RaceSkill()
        {
            Console.WriteLine("可以飞");
        }
    }
    #endregion

    #region 老虎
    class Tiger :Felidae
    {
        public override void Cry()
        {
            base.Cry();
            Console.WriteLine("*威胁的低吼*");
        }
    }
    #endregion

    #region 猫
    class Cat:Felidae
    {
        public void Skill()
        {
            Console.WriteLine("抓老鼠");
        }

        public override void Cry()
        {
            base.Cry();
            Console.WriteLine("喵？");
        }
    }
    #endregion

    #region 🦅
    class Eagle:Birds
    {
        public override void Cry()
        {
            base.Cry();
            Console.WriteLine("为了自由。");
        }
    }
    #endregion

    #region 燕子
    class Swallow:Birds
    {
        public override void Cry()
        {
            base.Cry();
            Console.WriteLine("喳");
        }
    }
    #endregion

    class Introdute
    {
        public void PrintIntrodute(Animal a)
        {
            Console.WriteLine("我有{0}个头，{1}条腿。", a.Head, a.Leg);
            a.Walk();
            a.Cry();
            a.RaceSkill();
        }
    }
}
